#!/bin/sh

set -e

# a normal fail case

runtest()
{
  echo "here is some stdout text"
  echo "here is some stderr text" 1>&2
  return 1
}

case "$1" in
  test)
    if runtest; then
      echo PASS
    else
      echo FAIL but that is okay
    fi
    ;;
  *)
    echo "Usage: $0 {test}"
    exit 1
esac
